import {
    ROUTER_HOME_PATH,
    ROUTER_ROOT_PATH,
    ROUTER_LOGIN_PATH,
    ROUTE_NOT_FOUND_NAME,
    ROUTER_LAYOUT_COMPONENT,
    ROUTE_UNEXPECTED_COMPONENT
} from "@/router/constant";

export const ROOT_ROUTE: AppRouteRecord = {
    path: ROUTER_ROOT_PATH,
    name: 'Root',
    redirect: ROUTER_HOME_PATH,
}


export const LOGIN_ROUTE: AppRouteRecord = {
    path: ROUTER_LOGIN_PATH,
    name: 'Login',
    component: () => import('@/view/Login/index')

}

export const NOT_FOUND_ROUTE: AppRouteRecord = {
    path: '/:path(.*)*',
    name: ROUTE_NOT_FOUND_NAME,
    component: ROUTER_LAYOUT_COMPONENT,
    meta: {
        title: 'ErrorPage'
    },
    children: [{
        path: '/:path(.*)*',
        name: ROUTE_NOT_FOUND_NAME,
        component: ROUTE_UNEXPECTED_COMPONENT,
        meta: {
            title: 'ErrorPage'
        },
    }]

}

export const basicRoutes: AppRouteRecord[] = [
    ROOT_ROUTE,
    LOGIN_ROUTE,
]